package com.hq.fxh.No5_User.MyModle;


import android.util.Log;

import rx.Subscriber;

/**
 * Created by bruce on 16/5/9.
 */
public class NetworkSubscriber<T> extends Subscriber<T> {

    @Override
    public void onCompleted() {
    }

    @Override
    public void onError(Throwable e) {//网络请求失败时执行(参数错误/网络超时)
        Log.e("Xie", "net err", e);
    }

    @Override
    public void onNext(T t) {
        if (t != null) {
            onSuccess(t);
        }
    }

    public int onSuccess(T data) {
        return 0;
    }

    public void onMessage(String message) {

    }
}
